<template>
    <div class="card">
        <div class="card-img">
            <span class="card-title fs16">
                <!-- 卡片标题 -->
                <div class="title-text">
                    {{ props.scrapeDataTitle }}
                </div>
                <!-- 详情按钮 -->
                <slot name="detailButton"></slot>
            </span>
        </div>
        <div class="card-container">
            <!-- 卡片内容,插入图表 -->
            <slot></slot>
        </div>
    </div>
</template>

<script setup lang="ts">
const props = defineProps({
    scrapeDataTitle: {
        type: String,
        default: '卡片标题'
    },
})




</script>

<style lang="scss" >
.card {
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;

    .card-img {
        width: 100%;
        min-height: 40px;
        background-image: url('../../assets/cardImages/小标题.png');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
        object-fit: fill;
        display: flex;
        align-items: center;
        margin-left: 24px;

        .card-title {
            margin-left: 30px;
            font-family: Microsoft YaHei-Bold, Microsoft YaHei;

            width: 85%;
            display: flex;
            align-items: center;
            justify-content: space-between;

            .title-text {
                font-weight: bold;
                background: linear-gradient(180deg, #FFFFFF 0%, #f2fafff2 30%, #a7dbf9 65%, #40C6FF 100%);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
            }


        }
    }

    .card-container {
        width: 100%;
        height: calc(100% - 40px);
    }

}
</style>